<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class: CalendarDateSelect</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Class</strong></td>
          <td class="class-name-in-header">CalendarDateSelect</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../files/vendor/plugins/calendar_date_select/lib/calendar_date_select_rb.html">
                vendor/plugins/calendar_date_select/lib/calendar_date_select.rb
                </a>
        <br />
                <a href="../files/vendor/plugins/calendar_date_select/lib/includes_helper_rb.html">
                vendor/plugins/calendar_date_select/lib/includes_helper.rb
                </a>
        <br />
            </td>
        </tr>

        <tr class="top-aligned-row">
            <td><strong>Parent:</strong></td>
            <td>
                Object
            </td>
        </tr>
        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">



   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000003">date_format_string</a>&nbsp;&nbsp;
      <a href="#M000001">format=</a>&nbsp;&nbsp;
      <a href="#M000004">format_date</a>&nbsp;&nbsp;
      <a href="#M000005">has_time?</a>&nbsp;&nbsp;
      <a href="#M000002">javascript_format_include</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">

    <div id="class-list">
      <h3 class="section-bar">Classes and Modules</h3>

      Module <a href="CalendarDateSelect/FormHelper.html" class="link">CalendarDateSelect::FormHelper</a><br />
Module <a href="CalendarDateSelect/IncludesHelper.html" class="link">CalendarDateSelect::IncludesHelper</a><br />

    </div>

    <div id="constants-list">
      <h3 class="section-bar">Constants</h3>

      <div class="name-list">
        <table summary="Constants">
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">FORMATS</td>
          <td>=</td>
          <td class="context-item-value">{     :natural =&gt; {       :date =&gt; &quot;%B %d, %Y&quot;,       :time =&gt; &quot; %I:%M %p&quot;</td>
        </tr>
        </table>
      </div>
    </div>



      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Class methods</h3>

      <div id="method-M000003" class="method-detail">
        <a name="M000003"></a>

        <div class="method-heading">
          <a href="#M000003" class="method-signature">
          <span class="method-name">date_format_string</span><span class="method-args">(time=false)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000003-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000003-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/calendar_date_select/lib/calendar_date_select.rb, line 60</span>
60:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">date_format_string</span>(<span class="ruby-identifier">time</span>=<span class="ruby-keyword kw">false</span>)
61:       <span class="ruby-ivar">@@format</span>[<span class="ruby-identifier">:date</span>] <span class="ruby-operator">+</span> ( <span class="ruby-identifier">time</span> <span class="ruby-value">? </span><span class="ruby-ivar">@@format</span>[<span class="ruby-identifier">:time</span>] <span class="ruby-operator">:</span> <span class="ruby-value str">&quot;&quot;</span> )
62:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000001" class="method-detail">
        <a name="M000001"></a>

        <div class="method-heading">
          <a href="#M000001" class="method-signature">
          <span class="method-name">format=</span><span class="method-args">(format)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000001-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000001-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/calendar_date_select/lib/calendar_date_select.rb, line 51</span>
51:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">format=</span>(<span class="ruby-identifier">format</span>)
52:       <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;CalendarDateSelect: Unrecognized format specification: #{format}&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">FORMATS</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">format</span>)
53:       <span class="ruby-ivar">@@format</span> = <span class="ruby-constant">FORMATS</span>[<span class="ruby-identifier">format</span>]
54:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000004" class="method-detail">
        <a name="M000004"></a>

        <div class="method-heading">
          <a href="#M000004" class="method-signature">
          <span class="method-name">format_date</span><span class="method-args">(date)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000004-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000004-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/calendar_date_select/lib/calendar_date_select.rb, line 64</span>
64:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">format_date</span>(<span class="ruby-identifier">date</span>)
65:       <span class="ruby-keyword kw">if</span> <span class="ruby-constant">Date</span><span class="ruby-operator">===</span><span class="ruby-identifier">date</span>
66:         <span class="ruby-identifier">date</span>.<span class="ruby-identifier">strftime</span>(<span class="ruby-identifier">date_format_string</span>(<span class="ruby-keyword kw">false</span>))
67:       <span class="ruby-keyword kw">else</span>
68:         <span class="ruby-identifier">date</span>.<span class="ruby-identifier">strftime</span>(<span class="ruby-identifier">date_format_string</span>(<span class="ruby-keyword kw">true</span>))
69:       <span class="ruby-keyword kw">end</span>
70:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000005" class="method-detail">
        <a name="M000005"></a>

        <div class="method-heading">
          <a href="#M000005" class="method-signature">
          <span class="method-name">has_time?</span><span class="method-args">(value)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000005-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000005-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/calendar_date_select/lib/calendar_date_select.rb, line 72</span>
72:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">has_time?</span>(<span class="ruby-identifier">value</span>)
73:       <span class="ruby-regexp re">/[0-9]:[0-9]{2}/</span>.<span class="ruby-identifier">match</span>(<span class="ruby-identifier">value</span>.<span class="ruby-identifier">to_s</span>)
74:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000002" class="method-detail">
        <a name="M000002"></a>

        <div class="method-heading">
          <a href="#M000002" class="method-signature">
          <span class="method-name">javascript_format_include</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000002-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000002-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/calendar_date_select/lib/calendar_date_select.rb, line 56</span>
56:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">javascript_format_include</span>
57:       <span class="ruby-ivar">@@format</span>[<span class="ruby-identifier">:javascript_include</span>] <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-node">&quot;calendar_date_select/#{@@format[:javascript_include]}&quot;</span>
58:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>